#include "Int_Buzzer.h"
#include "Dri_Timer_2.h"
#include "Dri_Grip.h"

static u16 S_TIMER_LENGTH = 0;
/**
 * @brief 蜂鸣器定时器
 */
void Int_BUzzer_TimerBack()
{
    if (S_TIMER_LENGTH > 0) {
        BUZZER = ~BUZZER;
        S_TIMER_LENGTH--;
    }
}

/**
 * @brief 蜂鸣器响多少时间
 *
 * @param timer 毫秒
 */
void Int_BUzzer_Ring(u16 timer)
{
    S_TIMER_LENGTH = timer;
}
